//
//  TabbarController.swift
//  民生生活
//
//  Created by apple on 2017/8/4.
//  Copyright © 2017年 youjindi.app.com. All rights reserved.
//

import UIKit

class TabbarController: UITabBarController {

    private func setupOneChildViewController(_ vc: UIViewController,_ title: String,_ image: String,_ selectedImage:String){
        vc.tabBarItem.title = title
        vc.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName:RGBColor(122, 120, 121)], for: .normal)
        vc.tabBarItem.setTitleTextAttributes([NSForegroundColorAttributeName:RGBColor(246, 125, 141)], for: .selected)
        vc.tabBarItem.image = UIImage(named: image)?.withRenderingMode(.alwaysOriginal)
        vc.tabBarItem.selectedImage = UIImage(named: selectedImage)?.withRenderingMode(.alwaysOriginal)
        self.addChildViewController(NavigationController(rootViewController: vc))
    }

}

extension TabbarController: UITabBarControllerDelegate{
    
}
